package com.chen.facemanager;

import com.chen.facemanager.util.FileDfsUtil;
import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;

@RunWith(SpringRunner.class)
@SpringBootTest
public class FastDFS {

//    @Resource
//    private FastFileStorageClient storageClient ;
//
//
//    @Test
//    public void test() throws FileNotFoundException {
//
//        File file = new File("C:\\Users\\Mr-CHEN\\Pictures\\sao.png");
//        StorePath storePath = storageClient.uploadFile(null,new FileInputStream(file),file.length(),"png");
//        System.out.println(storePath);
//    }
}
